import request from '../utils/request';

/**
 * 原来
 */
// export function fetchMileageReportData(params) {
//   return request({
//     url: 'report/mileage/',
//     params,
//   });
// }

export function fetchMileageReportData(params) {
  var company_id = JSON.parse(localStorage.getItem('user')).company_id;
  return request({
    url: `device_mileage/?company_id=${company_id}`+params
  });
}



export function fetchStayReportData(params) {
  return request({
    url: 'report/stay/',
    params,
  });
}


export function fetchRunReportData(params) {
  return request({
    url: 'report/run/',
    params,
  });
}


export function fetchErrorReportData(params) {
  return request({
    url: 'report/error/',
    params,
  });
}

export function fetchSpeedReportData(params) {
  return request({
    url: 'report/speed/',
    params,
  });
}
